<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/pico/time.h Source File</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.0.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('common_2pico__time_2include_2pico_2time_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">time.h</div></div>
</div><!--header-->
<div class="contents">
<a href="common_2pico__time_2include_2pico_2time_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> */</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#ifndef _PICO_TIME_H</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#define _PICO_TIME_H</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;<a class="code" href="pico_8h.html">pico.h</a>&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;<a class="code" href="rp2__common_2hardware__timer_2include_2hardware_2timer_8h.html">hardware/timer.h</a>&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="comment">// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_PICO_TIME, Enable/disable assertions in the pico_time module, type=bool, default=0, group=pico_time</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">#ifndef PARAM_ASSERTIONS_ENABLED_PICO_TIME</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#ifdef PARAM_ASSERTIONS_ENABLED_PICO_TIME </span><span class="comment">// backwards compatibility with SDK &lt; 2.0.0</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="preprocessor">#define PARAM_ASSERTIONS_ENABLED_PICO_TIME PARAM_ASSERTIONS_ENABLED_TIME</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="preprocessor">#define PARAM_ASSERTIONS_ENABLED_PICO_TIME 0</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="comment">// PICO_CONFIG: PICO_TIME_SLEEP_OVERHEAD_ADJUST_US, How many microseconds to wake up early (and then busy_wait) to account for timer overhead when sleeping in low power mode, type=int, default=6, group=pico_time</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="preprocessor">#ifndef PICO_TIME_SLEEP_OVERHEAD_ADJUST_US</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="preprocessor">#define PICO_TIME_SLEEP_OVERHEAD_ADJUST_US 6</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="group__timestamp.html#ga6a1d4dfb43030b6594fa050f50feb47a">   66</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> <a class="code hl_function" href="group__timestamp.html#ga6a1d4dfb43030b6594fa050f50feb47a">get_absolute_time</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>    <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> t;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>    <a class="code hl_function" href="group__timestamp.html#gacb69a734d588b758f1ada8af8efe6968">update_us_since_boot</a>(&amp;t, <a class="code hl_function" href="group__hardware__timer.html#ga7bbcd996dbd3dd4adc03a80272fb2fc3">time_us_64</a>());</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    <span class="keywordflow">return</span> t;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>}</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="keyword">static</span> <span class="keyword">inline</span> uint32_t us_to_ms(uint64_t us) {</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>    <span class="keywordflow">if</span> (us &gt;&gt; 32u) {</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>        <span class="keywordflow">return</span> (uint32_t)(us / 1000u);</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>        <span class="keywordflow">return</span> ((uint32_t)us) / 1000u;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>    }</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>}</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="group__timestamp.html#gab12467c48bde27171b552ac4dc8c7d59">   87</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint32_t <a class="code hl_function" href="group__timestamp.html#gab12467c48bde27171b552ac4dc8c7d59">to_ms_since_boot</a>(<a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> t) {</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>    uint64_t us = <a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(t);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>    <span class="keywordflow">return</span> us_to_ms(us);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>}</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="group__timestamp.html#ga729dc88ec38af2d054ba7307214bcf3c">   99</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> <a class="code hl_function" href="group__timestamp.html#ga729dc88ec38af2d054ba7307214bcf3c">delayed_by_us</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> t, uint64_t us) {</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>    <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> t2;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    uint64_t base = <a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(t);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>    uint64_t delayed = base + us;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>    <span class="keywordflow">if</span> ((int64_t)delayed &lt; 0) {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>        <span class="comment">// absolute_time_t (to allow for signed time deltas) is never greater than INT64_MAX which == at_the_end_of_time</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>        delayed = INT64_MAX;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>    }</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>    <a class="code hl_function" href="group__timestamp.html#gacb69a734d588b758f1ada8af8efe6968">update_us_since_boot</a>(&amp;t2, delayed);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>    <span class="keywordflow">return</span> t2;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>}</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"><a class="line" href="group__timestamp.html#ga7ee031a9cdeb9a9a6328d1b41d53cf5c">  118</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> <a class="code hl_function" href="group__timestamp.html#ga7ee031a9cdeb9a9a6328d1b41d53cf5c">delayed_by_ms</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> t, uint32_t ms) {</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>    <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> t2;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>    uint64_t base = <a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(t);</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>    uint64_t delayed = base + ms * 1000ull;</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>    <span class="keywordflow">if</span> ((int64_t)delayed &lt; 0) {</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>        <span class="comment">// absolute_time_t (to allow for signed time deltas) is never greater than INT64_MAX which == at_the_end_of_time</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>        delayed = INT64_MAX;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>    }</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>    <a class="code hl_function" href="group__timestamp.html#gacb69a734d588b758f1ada8af8efe6968">update_us_since_boot</a>(&amp;t2, delayed);</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>    <span class="keywordflow">return</span> t2;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>}</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span> </div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"><a class="line" href="group__timestamp.html#ga70921b9073202a54eec3494b4d19ec84">  136</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> <a class="code hl_function" href="group__timestamp.html#ga70921b9073202a54eec3494b4d19ec84">make_timeout_time_us</a>(uint64_t us) {</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__timestamp.html#ga729dc88ec38af2d054ba7307214bcf3c">delayed_by_us</a>(<a class="code hl_function" href="group__timestamp.html#ga6a1d4dfb43030b6594fa050f50feb47a">get_absolute_time</a>(), us);</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>}</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="group__timestamp.html#gab11f5a243dd585b6903a87b0127df2cc">  146</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> <a class="code hl_function" href="group__timestamp.html#gab11f5a243dd585b6903a87b0127df2cc">make_timeout_time_ms</a>(uint32_t ms) {</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__timestamp.html#ga7ee031a9cdeb9a9a6328d1b41d53cf5c">delayed_by_ms</a>(<a class="code hl_function" href="group__timestamp.html#ga6a1d4dfb43030b6594fa050f50feb47a">get_absolute_time</a>(), ms);</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>}</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span> </div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"><a class="line" href="group__timestamp.html#ga36d9cbebcc55e41921550edbabf17ab2">  161</a></span><span class="keyword">static</span> <span class="keyword">inline</span> int64_t <a class="code hl_function" href="group__timestamp.html#ga36d9cbebcc55e41921550edbabf17ab2">absolute_time_diff_us</a>(<a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> from, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> to) {</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>    <span class="keywordflow">return</span> (int64_t)(<a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(to) - <a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(from));</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>}</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="group__timestamp.html#ga522e97b4c9dfeb3db0bc702461b61a3a">  172</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> <a class="code hl_function" href="group__timestamp.html#ga522e97b4c9dfeb3db0bc702461b61a3a">absolute_time_min</a>(<a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> a, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> b) {</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(a) &lt; <a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(b) ? a : b;</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>}</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> <a class="code hl_variable" href="group__timestamp.html#gab375b40e949dce1052298f79c66f7120">at_the_end_of_time</a>;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span> </div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"><a class="line" href="group__timestamp.html#ga408e44143880dd2a9ebfe2f3ebeab242">  189</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__timestamp.html#ga408e44143880dd2a9ebfe2f3ebeab242">is_at_the_end_of_time</a>(<a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> t) {</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(t) == <a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(<a class="code hl_variable" href="group__timestamp.html#gab375b40e949dce1052298f79c66f7120">at_the_end_of_time</a>);</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>}</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> <a class="code hl_variable" href="group__timestamp.html#ga978d7972634296a1870c28b0727beefb">nil_time</a>;</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span> </div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="group__timestamp.html#ga0753884ef1d9340edacf53e9c06e42de">  204</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__timestamp.html#ga0753884ef1d9340edacf53e9c06e42de">is_nil_time</a>(<a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> t) {</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>    <span class="keywordflow">return</span> !<a class="code hl_function" href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a>(t);</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>}</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span> </div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__sleep.html#ga7abed28d3918fe2b15f8007ba6569172">sleep_until</a>(<a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> target);</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span> </div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__sleep.html#gaeeaebd3a10e0a193022f15c8603772ba">sleep_us</a>(uint64_t us);</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span> </div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__sleep.html#gae617a6842d4f3a192064c4354b88fcff">sleep_ms</a>(uint32_t ms);</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span> </div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno">  291</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__sleep.html#gaedc0ed51a5e908ddd660a5d279009abc">best_effort_wfe_or_timeout</a>(<a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> timeout_timestamp);</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno">  292</span> </div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span><span class="comment">// PICO_CONFIG: PICO_TIME_DEFAULT_ALARM_POOL_DISABLED, Disable the default alarm pool, type=bool, default=0, advanced=true, group=pico_time</span></div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span><span class="preprocessor">#ifndef PICO_TIME_DEFAULT_ALARM_POOL_DISABLED</span></div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"><a class="line" href="group__alarm.html#ga72314cafa18f7b2f90f9200be136ca27">  325</a></span><span class="preprocessor">#define PICO_TIME_DEFAULT_ALARM_POOL_DISABLED 0</span></div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno">  326</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno">  327</span> </div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno">  328</span><span class="comment">// PICO_CONFIG: PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM, Select which HW alarm is used for the default alarm pool, min=0, max=3, default=3, advanced=true, group=pico_time</span></div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno">  329</span><span class="preprocessor">#ifndef PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM</span></div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"><a class="line" href="group__alarm.html#ga40b4a03bf9e967d4e7170d20c5c9fb15">  335</a></span><span class="preprocessor">#define PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM 3</span></div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno">  336</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno">  337</span> </div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno">  338</span><span class="comment">// PICO_CONFIG: PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS, Selects the maximum number of concurrent timers in the default alarm pool, min=0, max=255, default=16, advanced=true, group=pico_time</span></div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno">  339</span><span class="preprocessor">#ifndef PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS</span></div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"><a class="line" href="group__alarm.html#ga4bb3180aa64f3c9af8c521ec1b22bdb2">  348</a></span><span class="preprocessor">#define PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS 16</span></div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno">  349</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno">  350</span> </div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"><a class="line" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">  365</a></span><span class="keyword">typedef</span> int32_t <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a>; <span class="comment">// note this is signed because we use &lt;0 as a meaningful error value</span></div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno">  366</span> </div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"><a class="line" href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">  376</a></span><span class="keyword">typedef</span> int64_t (*<a class="code hl_typedef" href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">alarm_callback_t</a>)(<a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> id, <span class="keywordtype">void</span> *user_data);</div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno">  377</span> </div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno">  378</span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structalarm__pool.html">alarm_pool</a> <a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a>;</div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno">  379</span><span class="keyword">typedef</span> <span class="keywordtype">void</span> alarm_pool_timer_t;</div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno">  380</span> </div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno">  385</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__alarm.html#gab363026fa15b43405538eb087ee7cfa9">alarm_pool_init_default</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno">  386</span><span class="keywordtype">void</span> runtime_init_default_alarm_pool(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno">  387</span> </div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno">  388</span><span class="preprocessor">#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED</span></div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno">  396</span><a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *<a class="code hl_function" href="group__alarm.html#ga5092ceb879289c0a597a389f34b4815e">alarm_pool_get_default</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno">  397</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno">  398</span> </div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno">  399</span><a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *alarm_pool_create_on_timer(alarm_pool_timer_t *timer, uint timer_alarm_num, uint max_timers);</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno">  400</span> </div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno">  401</span>alarm_pool_timer_t *alarm_pool_timer_for_timer_num(uint timer_num);</div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno">  402</span> </div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno">  403</span>alarm_pool_timer_t *alarm_pool_get_default_timer(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno">  404</span> </div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"><a class="line" href="group__alarm.html#ga185db8b4e54a13d19fca6e5d2761bae6">  423</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *<a class="code hl_function" href="group__alarm.html#ga185db8b4e54a13d19fca6e5d2761bae6">alarm_pool_create</a>(uint timer_alarm_num, uint max_timers) {</div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno">  424</span>    <span class="keywordflow">return</span> alarm_pool_create_on_timer(alarm_pool_get_default_timer(), timer_alarm_num, max_timers);</div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno">  425</span>}</div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno">  426</span> </div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno">  427</span><a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *alarm_pool_create_on_timer_with_unused_hardware_alarm(alarm_pool_timer_t *timer, uint max_timers);</div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno">  428</span> </div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"><a class="line" href="group__alarm.html#ga722973ee82ee4cffb438dc478471d138">  446</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *<a class="code hl_function" href="group__alarm.html#ga722973ee82ee4cffb438dc478471d138">alarm_pool_create_with_unused_hardware_alarm</a>(uint max_timers) {</div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno">  447</span>    <span class="keywordflow">return</span> alarm_pool_create_on_timer_with_unused_hardware_alarm(alarm_pool_get_default_timer(), max_timers);</div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno">  448</span>}</div>
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno">  449</span> </div>
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno">  456</span>uint <a class="code hl_function" href="group__alarm.html#gaeb9321260fecc29b551d5e6ceffccc99">alarm_pool_timer_alarm_num</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool);</div>
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno">  457</span><span class="comment">// backwards compatibility</span></div>
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno">  458</span><span class="keyword">static</span> <span class="keyword">inline</span> uint alarm_pool_hardware_alarm_num(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool) {</div>
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno">  459</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__alarm.html#gaeb9321260fecc29b551d5e6ceffccc99">alarm_pool_timer_alarm_num</a>(pool);</div>
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno">  460</span>}</div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno">  467</span>uint <a class="code hl_function" href="group__alarm.html#ga4918e03a3ddd5c328d65bd014d26856b">alarm_pool_core_num</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool);</div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno">  468</span> </div>
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno">  474</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__alarm.html#gae7536c4d34088a2d19b2da92b87cbb4e">alarm_pool_destroy</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool);</div>
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno">  475</span> </div>
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno">  497</span><a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> <a class="code hl_function" href="group__alarm.html#gab75446a927e4e870ad27fde145a88019">alarm_pool_add_alarm_at</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> time, <a class="code hl_typedef" href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">alarm_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <span class="keywordtype">bool</span> fire_if_past);</div>
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno">  498</span> </div>
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno">  516</span><a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> <a class="code hl_function" href="group__alarm.html#ga72bfc8c2dd5bf334cd68af2e349a1b37">alarm_pool_add_alarm_at_force_in_context</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> time, <a class="code hl_typedef" href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">alarm_callback_t</a> callback,</div>
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno">  517</span>                                                    <span class="keywordtype">void</span> *user_data);</div>
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"><a class="line" href="group__alarm.html#ga0d00072e81de2d54fa690dc4b4bfe408">  539</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> <a class="code hl_function" href="group__alarm.html#ga0d00072e81de2d54fa690dc4b4bfe408">alarm_pool_add_alarm_in_us</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool, uint64_t us, <a class="code hl_typedef" href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">alarm_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <span class="keywordtype">bool</span> fire_if_past) {</div>
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno">  540</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__alarm.html#gab75446a927e4e870ad27fde145a88019">alarm_pool_add_alarm_at</a>(pool, <a class="code hl_function" href="group__timestamp.html#ga729dc88ec38af2d054ba7307214bcf3c">delayed_by_us</a>(<a class="code hl_function" href="group__timestamp.html#ga6a1d4dfb43030b6594fa050f50feb47a">get_absolute_time</a>(), us), callback, user_data, fire_if_past);</div>
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno">  541</span>}</div>
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno">  542</span> </div>
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"><a class="line" href="group__alarm.html#ga6e32765c525683f216fc42bd1984e239">  564</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> <a class="code hl_function" href="group__alarm.html#ga6e32765c525683f216fc42bd1984e239">alarm_pool_add_alarm_in_ms</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool, uint32_t ms, <a class="code hl_typedef" href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">alarm_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <span class="keywordtype">bool</span> fire_if_past) {</div>
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno">  565</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__alarm.html#gab75446a927e4e870ad27fde145a88019">alarm_pool_add_alarm_at</a>(pool, <a class="code hl_function" href="group__timestamp.html#ga7ee031a9cdeb9a9a6328d1b41d53cf5c">delayed_by_ms</a>(<a class="code hl_function" href="group__timestamp.html#ga6a1d4dfb43030b6594fa050f50feb47a">get_absolute_time</a>(), ms), callback, user_data, fire_if_past);</div>
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno">  566</span>}</div>
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno">  567</span> </div>
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno">  578</span>int64_t <a class="code hl_function" href="group__alarm.html#ga342ebecd5ebc1a39f1da0bac81069712">alarm_pool_remaining_alarm_time_us</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool, <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> alarm_id);</div>
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno">  579</span> </div>
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno">  590</span>int32_t <a class="code hl_function" href="group__alarm.html#ga3a9a4343aa9efe22e4324dc82ad2f3ec">alarm_pool_remaining_alarm_time_ms</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool, <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> alarm_id);</div>
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno">  591</span> </div>
<div class="line"><a id="l00600" name="l00600"></a><span class="lineno">  600</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__alarm.html#ga02cc23b4a3109fb8c2d57e24981f2932">alarm_pool_cancel_alarm</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool, <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> alarm_id);</div>
<div class="line"><a id="l00601" name="l00601"></a><span class="lineno">  601</span> </div>
<div class="line"><a id="l00602" name="l00602"></a><span class="lineno">  602</span><span class="preprocessor">#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED</span></div>
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno"><a class="line" href="group__alarm.html#gae98ddd58a2c1d142eb6db7882512ce8d">  623</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> <a class="code hl_function" href="group__alarm.html#gae98ddd58a2c1d142eb6db7882512ce8d">add_alarm_at</a>(<a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> time, <a class="code hl_typedef" href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">alarm_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <span class="keywordtype">bool</span> fire_if_past) {</div>
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno">  624</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__alarm.html#gab75446a927e4e870ad27fde145a88019">alarm_pool_add_alarm_at</a>(<a class="code hl_function" href="group__alarm.html#ga5092ceb879289c0a597a389f34b4815e">alarm_pool_get_default</a>(), time, callback, user_data, fire_if_past);</div>
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno">  625</span>}</div>
<div class="line"><a id="l00626" name="l00626"></a><span class="lineno">  626</span> </div>
<div class="line"><a id="l00647" name="l00647"></a><span class="lineno"><a class="line" href="group__alarm.html#ga69b4481d9d9a906caefb31c54a048575">  647</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> <a class="code hl_function" href="group__alarm.html#ga69b4481d9d9a906caefb31c54a048575">add_alarm_in_us</a>(uint64_t us, <a class="code hl_typedef" href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">alarm_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <span class="keywordtype">bool</span> fire_if_past) {</div>
<div class="line"><a id="l00648" name="l00648"></a><span class="lineno">  648</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__alarm.html#ga0d00072e81de2d54fa690dc4b4bfe408">alarm_pool_add_alarm_in_us</a>(<a class="code hl_function" href="group__alarm.html#ga5092ceb879289c0a597a389f34b4815e">alarm_pool_get_default</a>(), us, callback, user_data, fire_if_past);</div>
<div class="line"><a id="l00649" name="l00649"></a><span class="lineno">  649</span>}</div>
<div class="line"><a id="l00650" name="l00650"></a><span class="lineno">  650</span> </div>
<div class="line"><a id="l00671" name="l00671"></a><span class="lineno"><a class="line" href="group__alarm.html#ga8bb045ab597f773d7d5fdfea5db94f69">  671</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> <a class="code hl_function" href="group__alarm.html#ga8bb045ab597f773d7d5fdfea5db94f69">add_alarm_in_ms</a>(uint32_t ms, <a class="code hl_typedef" href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">alarm_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <span class="keywordtype">bool</span> fire_if_past) {</div>
<div class="line"><a id="l00672" name="l00672"></a><span class="lineno">  672</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__alarm.html#ga6e32765c525683f216fc42bd1984e239">alarm_pool_add_alarm_in_ms</a>(<a class="code hl_function" href="group__alarm.html#ga5092ceb879289c0a597a389f34b4815e">alarm_pool_get_default</a>(), ms, callback, user_data, fire_if_past);</div>
<div class="line"><a id="l00673" name="l00673"></a><span class="lineno">  673</span>}</div>
<div class="line"><a id="l00681" name="l00681"></a><span class="lineno"><a class="line" href="group__alarm.html#gae99f63dc25fe5c3a0d78d9fb90308b1b">  681</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__alarm.html#gae99f63dc25fe5c3a0d78d9fb90308b1b">cancel_alarm</a>(<a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> alarm_id) {</div>
<div class="line"><a id="l00682" name="l00682"></a><span class="lineno">  682</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__alarm.html#ga02cc23b4a3109fb8c2d57e24981f2932">alarm_pool_cancel_alarm</a>(<a class="code hl_function" href="group__alarm.html#ga5092ceb879289c0a597a389f34b4815e">alarm_pool_get_default</a>(), alarm_id);</div>
<div class="line"><a id="l00683" name="l00683"></a><span class="lineno">  683</span>}</div>
<div class="line"><a id="l00684" name="l00684"></a><span class="lineno">  684</span> </div>
<div class="line"><a id="l00695" name="l00695"></a><span class="lineno">  695</span>int64_t <a class="code hl_function" href="group__alarm.html#ga549331a1b34938eb9f9dae03712a714c">remaining_alarm_time_us</a>(<a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> alarm_id);</div>
<div class="line"><a id="l00696" name="l00696"></a><span class="lineno">  696</span> </div>
<div class="line"><a id="l00706" name="l00706"></a><span class="lineno">  706</span>int32_t <a class="code hl_function" href="group__alarm.html#ga61affbec7fedd98582b1df8b5ca3fe3b">remaining_alarm_time_ms</a>(<a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> alarm_id);</div>
<div class="line"><a id="l00707" name="l00707"></a><span class="lineno">  707</span> </div>
<div class="line"><a id="l00708" name="l00708"></a><span class="lineno">  708</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00709" name="l00709"></a><span class="lineno">  709</span> </div>
<div class="line"><a id="l00720" name="l00720"></a><span class="lineno">  720</span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structrepeating__timer.html">repeating_timer</a> <a class="code hl_struct" href="structrepeating__timer.html">repeating_timer_t</a>;</div>
<div class="line"><a id="l00721" name="l00721"></a><span class="lineno">  721</span> </div>
<div class="line"><a id="l00728" name="l00728"></a><span class="lineno"><a class="line" href="group__repeating__timer.html#ga028fe2b7d00c1927c24131aae7c375f3">  728</a></span><span class="keyword">typedef</span> bool (*<a class="code hl_typedef" href="group__repeating__timer.html#ga028fe2b7d00c1927c24131aae7c375f3">repeating_timer_callback_t</a>)(<a class="code hl_struct" href="structrepeating__timer.html">repeating_timer_t</a> *rt);</div>
<div class="line"><a id="l00729" name="l00729"></a><span class="lineno">  729</span> </div>
<div class="line"><a id="l00735" name="l00735"></a><span class="lineno"><a class="line" href="structrepeating__timer.html">  735</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structrepeating__timer.html">repeating_timer</a> {</div>
<div class="line"><a id="l00736" name="l00736"></a><span class="lineno">  736</span>    int64_t delay_us;</div>
<div class="line"><a id="l00737" name="l00737"></a><span class="lineno">  737</span>    <a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool;</div>
<div class="line"><a id="l00738" name="l00738"></a><span class="lineno">  738</span>    <a class="code hl_typedef" href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a> alarm_id;</div>
<div class="line"><a id="l00739" name="l00739"></a><span class="lineno">  739</span>    <a class="code hl_typedef" href="group__repeating__timer.html#ga028fe2b7d00c1927c24131aae7c375f3">repeating_timer_callback_t</a> callback;</div>
<div class="line"><a id="l00740" name="l00740"></a><span class="lineno">  740</span>    <span class="keywordtype">void</span> *user_data;</div>
<div class="line"><a id="l00741" name="l00741"></a><span class="lineno">  741</span>};</div>
<div class="line"><a id="l00742" name="l00742"></a><span class="lineno">  742</span> </div>
<div class="line"><a id="l00761" name="l00761"></a><span class="lineno">  761</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__repeating__timer.html#ga75dad2018ae1e4c154fb17cd96db9872">alarm_pool_add_repeating_timer_us</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool, int64_t delay_us, <a class="code hl_typedef" href="group__repeating__timer.html#ga028fe2b7d00c1927c24131aae7c375f3">repeating_timer_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <a class="code hl_struct" href="structrepeating__timer.html">repeating_timer_t</a> *out);</div>
<div class="line"><a id="l00762" name="l00762"></a><span class="lineno">  762</span> </div>
<div class="line"><a id="l00781" name="l00781"></a><span class="lineno"><a class="line" href="group__repeating__timer.html#gae5a6b07212ea5e106a81fc2f814a9e9e">  781</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__repeating__timer.html#gae5a6b07212ea5e106a81fc2f814a9e9e">alarm_pool_add_repeating_timer_ms</a>(<a class="code hl_struct" href="structalarm__pool.html">alarm_pool_t</a> *pool, int32_t delay_ms, <a class="code hl_typedef" href="group__repeating__timer.html#ga028fe2b7d00c1927c24131aae7c375f3">repeating_timer_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <a class="code hl_struct" href="structrepeating__timer.html">repeating_timer_t</a> *out) {</div>
<div class="line"><a id="l00782" name="l00782"></a><span class="lineno">  782</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__repeating__timer.html#ga75dad2018ae1e4c154fb17cd96db9872">alarm_pool_add_repeating_timer_us</a>(pool, delay_ms * (int64_t)1000, callback, user_data, out);</div>
<div class="line"><a id="l00783" name="l00783"></a><span class="lineno">  783</span>}</div>
<div class="line"><a id="l00784" name="l00784"></a><span class="lineno">  784</span> </div>
<div class="line"><a id="l00785" name="l00785"></a><span class="lineno">  785</span><span class="preprocessor">#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED</span></div>
<div class="line"><a id="l00803" name="l00803"></a><span class="lineno"><a class="line" href="group__repeating__timer.html#ga8da55f26158144c2a9a813f69a524906">  803</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__repeating__timer.html#ga8da55f26158144c2a9a813f69a524906">add_repeating_timer_us</a>(int64_t delay_us, <a class="code hl_typedef" href="group__repeating__timer.html#ga028fe2b7d00c1927c24131aae7c375f3">repeating_timer_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <a class="code hl_struct" href="structrepeating__timer.html">repeating_timer_t</a> *out) {</div>
<div class="line"><a id="l00804" name="l00804"></a><span class="lineno">  804</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__repeating__timer.html#ga75dad2018ae1e4c154fb17cd96db9872">alarm_pool_add_repeating_timer_us</a>(<a class="code hl_function" href="group__alarm.html#ga5092ceb879289c0a597a389f34b4815e">alarm_pool_get_default</a>(), delay_us, callback, user_data, out);</div>
<div class="line"><a id="l00805" name="l00805"></a><span class="lineno">  805</span>}</div>
<div class="line"><a id="l00806" name="l00806"></a><span class="lineno">  806</span> </div>
<div class="line"><a id="l00824" name="l00824"></a><span class="lineno"><a class="line" href="group__repeating__timer.html#ga02133dbe7083fcf3c7392a2cfb8243ba">  824</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__repeating__timer.html#ga02133dbe7083fcf3c7392a2cfb8243ba">add_repeating_timer_ms</a>(int32_t delay_ms, <a class="code hl_typedef" href="group__repeating__timer.html#ga028fe2b7d00c1927c24131aae7c375f3">repeating_timer_callback_t</a> callback, <span class="keywordtype">void</span> *user_data, <a class="code hl_struct" href="structrepeating__timer.html">repeating_timer_t</a> *out) {</div>
<div class="line"><a id="l00825" name="l00825"></a><span class="lineno">  825</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__repeating__timer.html#ga75dad2018ae1e4c154fb17cd96db9872">alarm_pool_add_repeating_timer_us</a>(<a class="code hl_function" href="group__alarm.html#ga5092ceb879289c0a597a389f34b4815e">alarm_pool_get_default</a>(), delay_ms * (int64_t)1000, callback, user_data, out);</div>
<div class="line"><a id="l00826" name="l00826"></a><span class="lineno">  826</span>}</div>
<div class="line"><a id="l00827" name="l00827"></a><span class="lineno">  827</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00828" name="l00828"></a><span class="lineno">  828</span> </div>
<div class="line"><a id="l00836" name="l00836"></a><span class="lineno">  836</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__repeating__timer.html#ga9ad5a07a3f2300cc9d46c1c847fae6f1">cancel_repeating_timer</a>(<a class="code hl_struct" href="structrepeating__timer.html">repeating_timer_t</a> *timer);</div>
<div class="line"><a id="l00837" name="l00837"></a><span class="lineno">  837</span> </div>
<div class="line"><a id="l00838" name="l00838"></a><span class="lineno">  838</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00839" name="l00839"></a><span class="lineno">  839</span>}</div>
<div class="line"><a id="l00840" name="l00840"></a><span class="lineno">  840</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00841" name="l00841"></a><span class="lineno">  841</span> </div>
<div class="line"><a id="l00842" name="l00842"></a><span class="lineno">  842</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="agroup__alarm_html_ga02cc23b4a3109fb8c2d57e24981f2932"><div class="ttname"><a href="group__alarm.html#ga02cc23b4a3109fb8c2d57e24981f2932">alarm_pool_cancel_alarm</a></div><div class="ttdeci">bool alarm_pool_cancel_alarm(alarm_pool_t *pool, alarm_id_t alarm_id)</div><div class="ttdoc">Cancel an alarm.</div><div class="ttdef"><b>Definition:</b> time.c:346</div></div>
<div class="ttc" id="agroup__alarm_html_ga0d00072e81de2d54fa690dc4b4bfe408"><div class="ttname"><a href="group__alarm.html#ga0d00072e81de2d54fa690dc4b4bfe408">alarm_pool_add_alarm_in_us</a></div><div class="ttdeci">static alarm_id_t alarm_pool_add_alarm_in_us(alarm_pool_t *pool, uint64_t us, alarm_callback_t callback, void *user_data, bool fire_if_past)</div><div class="ttdoc">Add an alarm callback to be called after a delay specified in microseconds.</div><div class="ttdef"><b>Definition:</b> time.h:539</div></div>
<div class="ttc" id="agroup__alarm_html_ga185db8b4e54a13d19fca6e5d2761bae6"><div class="ttname"><a href="group__alarm.html#ga185db8b4e54a13d19fca6e5d2761bae6">alarm_pool_create</a></div><div class="ttdeci">static alarm_pool_t * alarm_pool_create(uint timer_alarm_num, uint max_timers)</div><div class="ttdoc">Create an alarm pool.</div><div class="ttdef"><b>Definition:</b> time.h:423</div></div>
<div class="ttc" id="agroup__alarm_html_ga342ebecd5ebc1a39f1da0bac81069712"><div class="ttname"><a href="group__alarm.html#ga342ebecd5ebc1a39f1da0bac81069712">alarm_pool_remaining_alarm_time_us</a></div><div class="ttdeci">int64_t alarm_pool_remaining_alarm_time_us(alarm_pool_t *pool, alarm_id_t alarm_id)</div><div class="ttdoc">Return the time remaining before the next trigger of an alarm.</div><div class="ttdef"><b>Definition:</b> time.c:498</div></div>
<div class="ttc" id="agroup__alarm_html_ga3a9a4343aa9efe22e4324dc82ad2f3ec"><div class="ttname"><a href="group__alarm.html#ga3a9a4343aa9efe22e4324dc82ad2f3ec">alarm_pool_remaining_alarm_time_ms</a></div><div class="ttdeci">int32_t alarm_pool_remaining_alarm_time_ms(alarm_pool_t *pool, alarm_id_t alarm_id)</div><div class="ttdoc">Return the time remaining before the next trigger of an alarm.</div><div class="ttdef"><b>Definition:</b> time.c:526</div></div>
<div class="ttc" id="agroup__alarm_html_ga4918e03a3ddd5c328d65bd014d26856b"><div class="ttname"><a href="group__alarm.html#ga4918e03a3ddd5c328d65bd014d26856b">alarm_pool_core_num</a></div><div class="ttdeci">uint alarm_pool_core_num(alarm_pool_t *pool)</div><div class="ttdoc">Return the core number the alarm pool was initialized on (and hence callbacks are called on)</div><div class="ttdef"><b>Definition:</b> time.c:372</div></div>
<div class="ttc" id="agroup__alarm_html_ga5092ceb879289c0a597a389f34b4815e"><div class="ttname"><a href="group__alarm.html#ga5092ceb879289c0a597a389f34b4815e">alarm_pool_get_default</a></div><div class="ttdeci">alarm_pool_t * alarm_pool_get_default(void)</div><div class="ttdoc">The default alarm pool used when alarms are added without specifying an alarm pool,...</div><div class="ttdef"><b>Definition:</b> time.c:100</div></div>
<div class="ttc" id="agroup__alarm_html_ga549331a1b34938eb9f9dae03712a714c"><div class="ttname"><a href="group__alarm.html#ga549331a1b34938eb9f9dae03712a714c">remaining_alarm_time_us</a></div><div class="ttdeci">int64_t remaining_alarm_time_us(alarm_id_t alarm_id)</div><div class="ttdoc">Return the time remaining before the next trigger of an alarm.</div><div class="ttdef"><b>Definition:</b> time.c:533</div></div>
<div class="ttc" id="agroup__alarm_html_ga61affbec7fedd98582b1df8b5ca3fe3b"><div class="ttname"><a href="group__alarm.html#ga61affbec7fedd98582b1df8b5ca3fe3b">remaining_alarm_time_ms</a></div><div class="ttdeci">int32_t remaining_alarm_time_ms(alarm_id_t alarm_id)</div><div class="ttdoc">Return the time remaining before the next trigger of an alarm.</div><div class="ttdef"><b>Definition:</b> time.c:537</div></div>
<div class="ttc" id="agroup__alarm_html_ga69b4481d9d9a906caefb31c54a048575"><div class="ttname"><a href="group__alarm.html#ga69b4481d9d9a906caefb31c54a048575">add_alarm_in_us</a></div><div class="ttdeci">static alarm_id_t add_alarm_in_us(uint64_t us, alarm_callback_t callback, void *user_data, bool fire_if_past)</div><div class="ttdoc">Add an alarm callback to be called after a delay specified in microseconds.</div><div class="ttdef"><b>Definition:</b> time.h:647</div></div>
<div class="ttc" id="agroup__alarm_html_ga6e32765c525683f216fc42bd1984e239"><div class="ttname"><a href="group__alarm.html#ga6e32765c525683f216fc42bd1984e239">alarm_pool_add_alarm_in_ms</a></div><div class="ttdeci">static alarm_id_t alarm_pool_add_alarm_in_ms(alarm_pool_t *pool, uint32_t ms, alarm_callback_t callback, void *user_data, bool fire_if_past)</div><div class="ttdoc">Add an alarm callback to be called after a delay specified in milliseconds.</div><div class="ttdef"><b>Definition:</b> time.h:564</div></div>
<div class="ttc" id="agroup__alarm_html_ga722973ee82ee4cffb438dc478471d138"><div class="ttname"><a href="group__alarm.html#ga722973ee82ee4cffb438dc478471d138">alarm_pool_create_with_unused_hardware_alarm</a></div><div class="ttdeci">static alarm_pool_t * alarm_pool_create_with_unused_hardware_alarm(uint max_timers)</div><div class="ttdoc">Create an alarm pool, claiming an used timer_alarm to back it.</div><div class="ttdef"><b>Definition:</b> time.h:446</div></div>
<div class="ttc" id="agroup__alarm_html_ga72bfc8c2dd5bf334cd68af2e349a1b37"><div class="ttname"><a href="group__alarm.html#ga72bfc8c2dd5bf334cd68af2e349a1b37">alarm_pool_add_alarm_at_force_in_context</a></div><div class="ttdeci">alarm_id_t alarm_pool_add_alarm_at_force_in_context(alarm_pool_t *pool, absolute_time_t time, alarm_callback_t callback, void *user_data)</div><div class="ttdoc">Add an alarm callback to be called at or after a specific time.</div><div class="ttdef"><b>Definition:</b> time.c:313</div></div>
<div class="ttc" id="agroup__alarm_html_ga8bb045ab597f773d7d5fdfea5db94f69"><div class="ttname"><a href="group__alarm.html#ga8bb045ab597f773d7d5fdfea5db94f69">add_alarm_in_ms</a></div><div class="ttdeci">static alarm_id_t add_alarm_in_ms(uint32_t ms, alarm_callback_t callback, void *user_data, bool fire_if_past)</div><div class="ttdoc">Add an alarm callback to be called after a delay specified in milliseconds.</div><div class="ttdef"><b>Definition:</b> time.h:671</div></div>
<div class="ttc" id="agroup__alarm_html_gaa593548569c182a0d65d2e06a9c3493b"><div class="ttname"><a href="group__alarm.html#gaa593548569c182a0d65d2e06a9c3493b">alarm_id_t</a></div><div class="ttdeci">int32_t alarm_id_t</div><div class="ttdoc">The identifier for an alarm.</div><div class="ttdef"><b>Definition:</b> time.h:365</div></div>
<div class="ttc" id="agroup__alarm_html_gab363026fa15b43405538eb087ee7cfa9"><div class="ttname"><a href="group__alarm.html#gab363026fa15b43405538eb087ee7cfa9">alarm_pool_init_default</a></div><div class="ttdeci">void alarm_pool_init_default(void)</div><div class="ttdoc">Create the default alarm pool (if not already created or disabled)</div><div class="ttdef"><b>Definition:</b> time.c:95</div></div>
<div class="ttc" id="agroup__alarm_html_gab75446a927e4e870ad27fde145a88019"><div class="ttname"><a href="group__alarm.html#gab75446a927e4e870ad27fde145a88019">alarm_pool_add_alarm_at</a></div><div class="ttdeci">alarm_id_t alarm_pool_add_alarm_at(alarm_pool_t *pool, absolute_time_t time, alarm_callback_t callback, void *user_data, bool fire_if_past)</div><div class="ttdoc">Add an alarm callback to be called at a specific time.</div><div class="ttdef"><b>Definition:</b> time.c:304</div></div>
<div class="ttc" id="agroup__alarm_html_gade88ed45e9b59ad39d91f17c8709c16a"><div class="ttname"><a href="group__alarm.html#gade88ed45e9b59ad39d91f17c8709c16a">alarm_callback_t</a></div><div class="ttdeci">int64_t(* alarm_callback_t)(alarm_id_t id, void *user_data)</div><div class="ttdoc">User alarm callback.</div><div class="ttdef"><b>Definition:</b> time.h:376</div></div>
<div class="ttc" id="agroup__alarm_html_gae7536c4d34088a2d19b2da92b87cbb4e"><div class="ttname"><a href="group__alarm.html#gae7536c4d34088a2d19b2da92b87cbb4e">alarm_pool_destroy</a></div><div class="ttdeci">void alarm_pool_destroy(alarm_pool_t *pool)</div><div class="ttdoc">Destroy the alarm pool, cancelling all alarms and freeing up the underlying timer_alarm.</div><div class="ttdef"><b>Definition:</b> time.c:290</div></div>
<div class="ttc" id="agroup__alarm_html_gae98ddd58a2c1d142eb6db7882512ce8d"><div class="ttname"><a href="group__alarm.html#gae98ddd58a2c1d142eb6db7882512ce8d">add_alarm_at</a></div><div class="ttdeci">static alarm_id_t add_alarm_at(absolute_time_t time, alarm_callback_t callback, void *user_data, bool fire_if_past)</div><div class="ttdoc">Add an alarm callback to be called at a specific time.</div><div class="ttdef"><b>Definition:</b> time.h:623</div></div>
<div class="ttc" id="agroup__alarm_html_gae99f63dc25fe5c3a0d78d9fb90308b1b"><div class="ttname"><a href="group__alarm.html#gae99f63dc25fe5c3a0d78d9fb90308b1b">cancel_alarm</a></div><div class="ttdeci">static bool cancel_alarm(alarm_id_t alarm_id)</div><div class="ttdoc">Cancel an alarm from the default alarm pool.</div><div class="ttdef"><b>Definition:</b> time.h:681</div></div>
<div class="ttc" id="agroup__alarm_html_gaeb9321260fecc29b551d5e6ceffccc99"><div class="ttname"><a href="group__alarm.html#gaeb9321260fecc29b551d5e6ceffccc99">alarm_pool_timer_alarm_num</a></div><div class="ttdeci">uint alarm_pool_timer_alarm_num(alarm_pool_t *pool)</div><div class="ttdoc">Return the timer alarm used by an alarm pool.</div><div class="ttdef"><b>Definition:</b> time.c:368</div></div>
<div class="ttc" id="agroup__hardware__timer_html_ga7bbcd996dbd3dd4adc03a80272fb2fc3"><div class="ttname"><a href="group__hardware__timer.html#ga7bbcd996dbd3dd4adc03a80272fb2fc3">time_us_64</a></div><div class="ttdeci">uint64_t time_us_64(void)</div><div class="ttdoc">Return the current 64 bit timestamp value in microseconds for the default timer instance.</div><div class="ttdef"><b>Definition:</b> timer.c:125</div></div>
<div class="ttc" id="agroup__repeating__timer_html_ga02133dbe7083fcf3c7392a2cfb8243ba"><div class="ttname"><a href="group__repeating__timer.html#ga02133dbe7083fcf3c7392a2cfb8243ba">add_repeating_timer_ms</a></div><div class="ttdeci">static bool add_repeating_timer_ms(int32_t delay_ms, repeating_timer_callback_t callback, void *user_data, repeating_timer_t *out)</div><div class="ttdoc">Add a repeating timer that is called repeatedly at the specified interval in milliseconds.</div><div class="ttdef"><b>Definition:</b> time.h:824</div></div>
<div class="ttc" id="agroup__repeating__timer_html_ga028fe2b7d00c1927c24131aae7c375f3"><div class="ttname"><a href="group__repeating__timer.html#ga028fe2b7d00c1927c24131aae7c375f3">repeating_timer_callback_t</a></div><div class="ttdeci">bool(* repeating_timer_callback_t)(repeating_timer_t *rt)</div><div class="ttdoc">Callback for a repeating timer.</div><div class="ttdef"><b>Definition:</b> time.h:728</div></div>
<div class="ttc" id="agroup__repeating__timer_html_ga75dad2018ae1e4c154fb17cd96db9872"><div class="ttname"><a href="group__repeating__timer.html#ga75dad2018ae1e4c154fb17cd96db9872">alarm_pool_add_repeating_timer_us</a></div><div class="ttdeci">bool alarm_pool_add_repeating_timer_us(alarm_pool_t *pool, int64_t delay_us, repeating_timer_callback_t callback, void *user_data, repeating_timer_t *out)</div><div class="ttdoc">Add a repeating timer that is called repeatedly at the specified interval in microseconds.</div><div class="ttdef"><b>Definition:</b> time.c:470</div></div>
<div class="ttc" id="agroup__repeating__timer_html_ga8da55f26158144c2a9a813f69a524906"><div class="ttname"><a href="group__repeating__timer.html#ga8da55f26158144c2a9a813f69a524906">add_repeating_timer_us</a></div><div class="ttdeci">static bool add_repeating_timer_us(int64_t delay_us, repeating_timer_callback_t callback, void *user_data, repeating_timer_t *out)</div><div class="ttdoc">Add a repeating timer that is called repeatedly at the specified interval in microseconds.</div><div class="ttdef"><b>Definition:</b> time.h:803</div></div>
<div class="ttc" id="agroup__repeating__timer_html_ga9ad5a07a3f2300cc9d46c1c847fae6f1"><div class="ttname"><a href="group__repeating__timer.html#ga9ad5a07a3f2300cc9d46c1c847fae6f1">cancel_repeating_timer</a></div><div class="ttdeci">bool cancel_repeating_timer(repeating_timer_t *timer)</div><div class="ttdoc">Cancel a repeating timer.</div><div class="ttdef"><b>Definition:</b> time.c:481</div></div>
<div class="ttc" id="agroup__repeating__timer_html_gae5a6b07212ea5e106a81fc2f814a9e9e"><div class="ttname"><a href="group__repeating__timer.html#gae5a6b07212ea5e106a81fc2f814a9e9e">alarm_pool_add_repeating_timer_ms</a></div><div class="ttdeci">static bool alarm_pool_add_repeating_timer_ms(alarm_pool_t *pool, int32_t delay_ms, repeating_timer_callback_t callback, void *user_data, repeating_timer_t *out)</div><div class="ttdoc">Add a repeating timer that is called repeatedly at the specified interval in milliseconds.</div><div class="ttdef"><b>Definition:</b> time.h:781</div></div>
<div class="ttc" id="agroup__sleep_html_ga7abed28d3918fe2b15f8007ba6569172"><div class="ttname"><a href="group__sleep.html#ga7abed28d3918fe2b15f8007ba6569172">sleep_until</a></div><div class="ttdeci">void sleep_until(absolute_time_t target)</div><div class="ttdoc">Wait until after the given timestamp to return.</div><div class="ttdef"><b>Definition:</b> time.c:384</div></div>
<div class="ttc" id="agroup__sleep_html_gae617a6842d4f3a192064c4354b88fcff"><div class="ttname"><a href="group__sleep.html#gae617a6842d4f3a192064c4354b88fcff">sleep_ms</a></div><div class="ttdeci">void sleep_ms(uint32_t ms)</div><div class="ttdoc">Wait for the given number of milliseconds before returning.</div><div class="ttdef"><b>Definition:</b> time.c:431</div></div>
<div class="ttc" id="agroup__sleep_html_gaedc0ed51a5e908ddd660a5d279009abc"><div class="ttname"><a href="group__sleep.html#gaedc0ed51a5e908ddd660a5d279009abc">best_effort_wfe_or_timeout</a></div><div class="ttdeci">bool best_effort_wfe_or_timeout(absolute_time_t timeout_timestamp)</div><div class="ttdoc">Helper method for blocking on a timeout.</div><div class="ttdef"><b>Definition:</b> time.c:435</div></div>
<div class="ttc" id="agroup__sleep_html_gaeeaebd3a10e0a193022f15c8603772ba"><div class="ttname"><a href="group__sleep.html#gaeeaebd3a10e0a193022f15c8603772ba">sleep_us</a></div><div class="ttdeci">void sleep_us(uint64_t us)</div><div class="ttdoc">Wait for the given number of microseconds before returning.</div><div class="ttdef"><b>Definition:</b> time.c:414</div></div>
<div class="ttc" id="agroup__timestamp_html_ga0753884ef1d9340edacf53e9c06e42de"><div class="ttname"><a href="group__timestamp.html#ga0753884ef1d9340edacf53e9c06e42de">is_nil_time</a></div><div class="ttdeci">static bool is_nil_time(absolute_time_t t)</div><div class="ttdoc">Determine if the given timestamp is nil.</div><div class="ttdef"><b>Definition:</b> time.h:204</div></div>
<div class="ttc" id="agroup__timestamp_html_ga173698876ae00331c92ed4e8c3ba98d1"><div class="ttname"><a href="group__timestamp.html#ga173698876ae00331c92ed4e8c3ba98d1">to_us_since_boot</a></div><div class="ttdeci">static uint64_t to_us_since_boot(absolute_time_t t)</div><div class="ttdoc">convert an absolute_time_t into a number of microseconds since boot.</div><div class="ttdef"><b>Definition:</b> types.h:52</div></div>
<div class="ttc" id="agroup__timestamp_html_ga36d9cbebcc55e41921550edbabf17ab2"><div class="ttname"><a href="group__timestamp.html#ga36d9cbebcc55e41921550edbabf17ab2">absolute_time_diff_us</a></div><div class="ttdeci">static int64_t absolute_time_diff_us(absolute_time_t from, absolute_time_t to)</div><div class="ttdoc">Return the difference in microseconds between two timestamps.</div><div class="ttdef"><b>Definition:</b> time.h:161</div></div>
<div class="ttc" id="agroup__timestamp_html_ga408e44143880dd2a9ebfe2f3ebeab242"><div class="ttname"><a href="group__timestamp.html#ga408e44143880dd2a9ebfe2f3ebeab242">is_at_the_end_of_time</a></div><div class="ttdeci">static bool is_at_the_end_of_time(absolute_time_t t)</div><div class="ttdoc">Determine if the given timestamp is &quot;at_the_end_of_time&quot;.</div><div class="ttdef"><b>Definition:</b> time.h:189</div></div>
<div class="ttc" id="agroup__timestamp_html_ga522e97b4c9dfeb3db0bc702461b61a3a"><div class="ttname"><a href="group__timestamp.html#ga522e97b4c9dfeb3db0bc702461b61a3a">absolute_time_min</a></div><div class="ttdeci">static absolute_time_t absolute_time_min(absolute_time_t a, absolute_time_t b)</div><div class="ttdoc">Return the earlier of two timestamps.</div><div class="ttdef"><b>Definition:</b> time.h:172</div></div>
<div class="ttc" id="agroup__timestamp_html_ga6a1d4dfb43030b6594fa050f50feb47a"><div class="ttname"><a href="group__timestamp.html#ga6a1d4dfb43030b6594fa050f50feb47a">get_absolute_time</a></div><div class="ttdeci">static absolute_time_t get_absolute_time(void)</div><div class="ttdoc">Return a representation of the current time.</div><div class="ttdef"><b>Definition:</b> time.h:66</div></div>
<div class="ttc" id="agroup__timestamp_html_ga70921b9073202a54eec3494b4d19ec84"><div class="ttname"><a href="group__timestamp.html#ga70921b9073202a54eec3494b4d19ec84">make_timeout_time_us</a></div><div class="ttdeci">static absolute_time_t make_timeout_time_us(uint64_t us)</div><div class="ttdoc">Convenience method to get the timestamp a number of microseconds from the current time.</div><div class="ttdef"><b>Definition:</b> time.h:136</div></div>
<div class="ttc" id="agroup__timestamp_html_ga729dc88ec38af2d054ba7307214bcf3c"><div class="ttname"><a href="group__timestamp.html#ga729dc88ec38af2d054ba7307214bcf3c">delayed_by_us</a></div><div class="ttdeci">static absolute_time_t delayed_by_us(const absolute_time_t t, uint64_t us)</div><div class="ttdoc">Return a timestamp value obtained by adding a number of microseconds to another timestamp.</div><div class="ttdef"><b>Definition:</b> time.h:99</div></div>
<div class="ttc" id="agroup__timestamp_html_ga7ee031a9cdeb9a9a6328d1b41d53cf5c"><div class="ttname"><a href="group__timestamp.html#ga7ee031a9cdeb9a9a6328d1b41d53cf5c">delayed_by_ms</a></div><div class="ttdeci">static absolute_time_t delayed_by_ms(const absolute_time_t t, uint32_t ms)</div><div class="ttdoc">Return a timestamp value obtained by adding a number of milliseconds to another timestamp.</div><div class="ttdef"><b>Definition:</b> time.h:118</div></div>
<div class="ttc" id="agroup__timestamp_html_ga8b7f3d602cc053f05bacceeacc257ed8"><div class="ttname"><a href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a></div><div class="ttdeci">uint64_t absolute_time_t</div><div class="ttdoc">An opaque 64 bit timestamp in microseconds.</div><div class="ttdef"><b>Definition:</b> types.h:43</div></div>
<div class="ttc" id="agroup__timestamp_html_ga978d7972634296a1870c28b0727beefb"><div class="ttname"><a href="group__timestamp.html#ga978d7972634296a1870c28b0727beefb">nil_time</a></div><div class="ttdeci">const absolute_time_t nil_time</div><div class="ttdoc">The timestamp representing a null timestamp.</div></div>
<div class="ttc" id="agroup__timestamp_html_gab11f5a243dd585b6903a87b0127df2cc"><div class="ttname"><a href="group__timestamp.html#gab11f5a243dd585b6903a87b0127df2cc">make_timeout_time_ms</a></div><div class="ttdeci">static absolute_time_t make_timeout_time_ms(uint32_t ms)</div><div class="ttdoc">Convenience method to get the timestamp a number of milliseconds from the current time.</div><div class="ttdef"><b>Definition:</b> time.h:146</div></div>
<div class="ttc" id="agroup__timestamp_html_gab12467c48bde27171b552ac4dc8c7d59"><div class="ttname"><a href="group__timestamp.html#gab12467c48bde27171b552ac4dc8c7d59">to_ms_since_boot</a></div><div class="ttdeci">static uint32_t to_ms_since_boot(absolute_time_t t)</div><div class="ttdoc">Convert a timestamp into a number of milliseconds since boot.</div><div class="ttdef"><b>Definition:</b> time.h:87</div></div>
<div class="ttc" id="agroup__timestamp_html_gab375b40e949dce1052298f79c66f7120"><div class="ttname"><a href="group__timestamp.html#gab375b40e949dce1052298f79c66f7120">at_the_end_of_time</a></div><div class="ttdeci">const absolute_time_t at_the_end_of_time</div><div class="ttdoc">The timestamp representing the end of time; this is actually not the maximum possible timestamp,...</div></div>
<div class="ttc" id="agroup__timestamp_html_gacb69a734d588b758f1ada8af8efe6968"><div class="ttname"><a href="group__timestamp.html#gacb69a734d588b758f1ada8af8efe6968">update_us_since_boot</a></div><div class="ttdeci">static void update_us_since_boot(absolute_time_t *t, uint64_t us_since_boot)</div><div class="ttdoc">update an absolute_time_t value to represent a given number of microseconds since boot</div><div class="ttdef"><b>Definition:</b> types.h:67</div></div>
<div class="ttc" id="apico_8h_html"><div class="ttname"><a href="pico_8h.html">pico.h</a></div></div>
<div class="ttc" id="arp2__common_2hardware__timer_2include_2hardware_2timer_8h_html"><div class="ttname"><a href="rp2__common_2hardware__timer_2include_2hardware_2timer_8h.html">timer.h</a></div></div>
<div class="ttc" id="astructalarm__pool_html"><div class="ttname"><a href="structalarm__pool.html">alarm_pool</a></div><div class="ttdef"><b>Definition:</b> time.c:28</div></div>
<div class="ttc" id="astructrepeating__timer_html"><div class="ttname"><a href="structrepeating__timer.html">repeating_timer</a></div><div class="ttdoc">Information about a repeating timer.</div><div class="ttdef"><b>Definition:</b> time.h:735</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>